<!DOCTYPE html>
<html lang="en">
<head>
	<title>Lightbox - Auto Size</title>
	<meta charset="utf-8" />
	<meta name="description" content="" />
	<meta name="keywords" content="" />
	<meta name="author" content="ComponentOne" />

	<link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />

	<script src="../../external/jquery-1.8.2.min.js" type="text/javascript"></script>
	<script src="../../external/jquery-ui-1.9.1.custom.min.js" type="text/javascript"></script>
	<link href="../../themes/wijmo/jquery.wijmo-open.2.3.2.css" rel="stylesheet" type="text/css" />
	<script src="../../external/jquery.wijmo-open.all.2.3.2.min.js" type="text/javascript"></script>
	<link href="../../themes/wijmo/jquery.wijmo.wijlightbox.css" rel="stylesheet" type="text/css"/>
	<script src="../../wijmo/jquery.wijmo.wijlightbox.js" type="text/javascript"></script>

	<script type="text/javascript">
		$(function () {
			$("#lightbox").wijlightbox({
				textPosition: 'titleOverlay',
				autoSize: true,
				keyNav: true,
				transAnimation: { animated: 'fade'}
			});

			$('.option').change(function () {
				$("#lightbox").wijlightbox('option', { 
					resizeAnimation: { animated: $('#animation').val() }
				});
			});
		});
	</script>
</head>
<body class="demo-single">

	<div class="container">
		<div class="header">
			<h2>Auto Size</h2>
		</div>
		<div class="main demo">
			<!-- Begin demo markup -->
				<div id="lightbox">
					<a href="http://lorempixum.com/600/400/sports/1" rel="wijlightbox[stock];player=img">
						<img src="http://lorempixum.com/150/125/sports/1" title="Sports 1" alt="Sports 1" /></a> 
					<a href="http://lorempixum.com/800/400/sports/2" rel="wijlightbox[stock];player=img">
						<img src="http://lorempixum.com/150/125/sports/2" title="Sports 2" alt="Sports 2" /></a> 
					<a href="http://lorempixum.com/600/400/sports/3" rel="wijlightbox[stock];player=img">
						<img src="http://lorempixum.com/150/125/sports/3" title="Sports 3" alt="Sports 3" /></a> 
					<a href="http://lorempixum.com/600/300/sports/4" rel="wijlightbox[stock];player=img">
						<img src="http://lorempixum.com/150/125/sports/4" title="Sports 4" alt="Sports 4" /></a>
				</div>

			<!-- End demo markup -->
			<div class="demo-options">
			<!-- Begin options markup -->
				<label>Animation</label>
				<select id="animation" class='option'>
					<option value="sync" selected='true'>Sync</option>
					<option value="wh">Width To Height</option>
					<option value="hw">Height To Width</option>
					<option value="none">None</option>
				</select>

			<!-- End options markup -->
			</div>
		</div>
		<div class="footer demo-description">
			<p>This sample demonstrates how to resize an image in the wijlightbox widget by setting the resizeAnimation option.</p>
		</div>
	</div>
</body>

</html>
